﻿<Window x:Class="TemplateGenerator.Controls.TemplateOverview"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             Height="400" Width="500" UseLayoutRounding="True" Title="Template Overview">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        
        <DataGrid x:Name="dtgTemplates" ItemsSource="{Binding}" AutoGenerateColumns="False" CanUserAddRows="False" Grid.Row="0">
            <DataGrid.Columns>
                <DataGridTextColumn Header="Name" Binding="{Binding Name}" Width="*" IsReadOnly="True"/>
                <DataGridTemplateColumn Header="Delete" Width="auto">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Button Content="Delete Template" Click="ButtonDeleteClick" />
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>    
            </DataGrid.Columns>
        </DataGrid>
        <DockPanel AllowDrop="True" Drop="FileDropHandler" Grid.Row="1" Margin="0 5 0 0">
            <TextBlock Text="Drop a .dotx template file here to add" Margin="5 0 0 0" />
        </DockPanel>
    </Grid>
</Window>
